home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Subject: Re: making #define`s to b
- Message-ID: <DpotxC.6LI@rci.ripco.com>
- X-Nntp-Sender: mambuhl@cook.ripco.com
- Sender: usenet@rci.ripco.com (Net News Admin)
- Organization: Ripco Internet BBS Chicago
- Date: Thu, 11 Apr 1996 07:53:36 GMT
-
- dheffel@vitds2.nswc.navy.mil (David R. Heffelfinger) in
- <1996Apr9.164443.28709@relay.nswc.navy.mil> asks:
-
- >Hi there,
- > There is (hopefully) a simple answer to my question:
-
- >I have some C code divided into different source files.
- >When I try to compile using
- > "cc file1.c file2.c file3.c"
- >the constants #define'd in file1.c are not visible in file2.c, is there a way t
- > make them visible to the other source files? In other words, is there som equ
- >valent to "extern" for constants?
-
- move the #defined constants to a header file (say `files.h'), and in
- each of the file?.c
- #include "files.h"
-
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-